package com.charmzenus.it.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "member", fallback = MemberClient.MemberClientFallback.class)
public interface MemberClient {

    @GetMapping("/test/orderTest")
    String orderTest(@RequestParam("name") String name);

    @Component
    class MemberClientFallback implements MemberClient {

        @Override
        public String orderTest(String name) {
            return "hello";
        }
    }

}
